Electrons and other charged particles process spins as one of their intrinsic particle properties and such a spin is associated with a spin angular momentum. A spin of an electron has two distinctive spin states. Electrons in an electrical current may be unpolarized by having the equal probabilities in the two spin states. The electrons in an electrical current are spin polarized by having more electrons in one spin state than electrons in the other spin state. A spin-polarized current can be achieved by manipulating the spin population via various methods, e.g., by passing the current through a magnetic layer having a particular magnetization. In various magnetic microstructures, a spin-polarized current can be directed into a magnetic layer to cause transfer of the angular momenta of the spin-polarized electrons to the magnetic layer and this transfer can lead to exertion of a spin-transfer torque on the local magnetic moments in the magnetic layer and precession of the magnetic moments in the magnetic layer. Under a proper condition, this spin-transfer torque can cause a flip or switch of the direction of the magnetization of the magnetic layer.